<html>
<head>
	<script language="JavaScript" type='text/javascript' src='/dwrstudy/dwr/engine.js'></script>
	<script language="JavaScript" type='text/javascript' src='/dwrstudy/dwr/util.js'></script>
	<script language="JavaScript" type='text/javascript' src='/dwrstudy/dwr/interface/PerformanceService.js'></script>

	<title>Performance Test</title>
	<script language="JavaScript">
	function getList() {
		PerformanceService.getList(function(data) {
			var msg = "";
			msg += "<table border='1'>";
			msg += "<thead>";
			msg += "<tr>";
			msg += "<td>Name</td>";
			for( var i = 1 ; i <= 10 ; i++) {
				msg += "<td>Property"+i+"</td>";
			}
			msg += "</tr>";
			msg += "</thead>";
			msg += "<tbody>";
			for( var idx = 0 ; idx < data.length ; idx++) {
				var bean = data[idx];
				msg += "<tr>";
				msg += "<td>" + bean.name + "</td>";
				for( var i = 1; i <= 10; i++) {
					msg += "<td>" + bean['property' + i] + "</td>";
				}
				msg += "</tr>";
			}
			msg += "</tbody>"
			msg += "</table>";
			document.getElementById("list").innerHTML = msg;
			setTimeout(getList, 1000);
		});
	}
	</script>
</head>

<body >

<li><input type="button" value="Get List" onclick="getList()"/></li>

<div id="list">
</div>

</body>
</html>